<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="../../css/style.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="/html/js/getParameter.js"></script>
  <script type="text/javascript" src="../../js/jquery.js"></script>
  <script type="text/javascript" src="../../js/api.js"></script>
  <script type="text/javascript" src="../../js/axios.js"></script>
</head>

<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li>仓库管理</li>
    <li>仓库管理</li>
    <li>仓库详情</li>
  </ul>
</div>
<div class="formbody">
  <div class="formtitle"><span>仓库信息</span></div>
  <ul class="forminfo">
    <li>
      <label>仓库名称</label>
      <cite id="c1">南京21号仓库</cite>
    </li>
    <li>
      <label>仓库地址</label>
      <cite id="c2">江苏南京苏铺路180号泸州花园7栋3单元1801室</cite>
    </li>
    <li>
      <label>所属区域</label>
      <cite id="c3">江苏省南京市</cite>
    </li>
    <li>
      <label>负责人</label>
      <cite id="c4">周仓</cite>
    </li>
    <li>
      <label>联系方式</label>
      <cite id="c5">17370899727</cite>
    </li>
    <li>
      <label>描述</label>
      <cite id="c6">天下第一仓</cite>
    </li>
    <li>
      <label>状态</label>
      <cite id="c7">可用</cite>
    </li>
    <li>
      <label>创建人</label>
      <cite id="c8">马云</cite>
    </li>
    <li>
      <label>创建时间</label>
      <cite id="c9">2017-11-18 15:36:10</cite>
    </li>
    <li>
      <label>&nbsp;</label>
      <input name="" type="button" class="btn" value="返回" onclick="window.history.go(-1);"/>
    </li>
  </ul>
</div>
</body>
</html>

<script type="text/javascript">
  $(function () {
    var id = getParameter("id");
    var ID = 'id='+id//{id:id}
    console.log(ID)
    axiosRequest("post", "/warehouse/queryWare", ID)
            .then((res) => {
              var ware = res.data;
              var state = "";
              if (ware.state==1){
                state="可用";
              }else{
                state = "不可用";
              }
              $("#c1").html(ware.cName);
              $("#c2").html(ware.cAddress);
              $("#c3").html(ware.province.pName+ware.city.cName);
              $("#c4").html(ware.user.uName);
              $("#c5").html(ware.user.uTelephone);
              $("#c6").html(ware.details);
              $("#c7").html(state);
              $("#c8").html(ware.creator.uName);
              $("#c9").html(ware.creationTime);
            })
  })
</script>
